@dircategory Miscellaneous * PV: (pv). Monitor the progress of data through a pipe.
Copyright (C) 2002 Andrew Wood
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Andrew Wood.
This is the documentation for pv
, a terminal-based tool for
monitoring the progress of data through a pipeline. It can be inserted into
any normal pipeline between two processes to give a visual indication of how
quickly data is passing through, how long it has taken, how near to
completion it is, and an estimate of how long it will be until completion.
Summary: pv [OPTION] [FILE]...
To use pv
, insert it in a pipeline between two processes, with
the appropriate options. Its standard input will be passed through to its
standard output and progress will be shown on standard error.
pv
will copy each supplied FILE in turn to standard output
(-
means standard input), or if no FILEs are specified just
standard input is copied. This is the same behaviour as cat
.
A simple example to watch how quickly a file is transferred using nc
:
pv file | nc -w 1 somewhere.com 3000
A similar example, transferring a file from another process and passing the
expected size to pv
:
cat file | pv -s 12345 | nc -w 1 somewhere.com 3000
A more complicated example using numeric output to feed into the
dialog
program for a full-screen progress display:
(tar cf - . \ | pv -n -s `du -sb . | awk '{print $1}'` \ | gzip -9 > out.tgz) 2>&1 \ | dialog --gauge 'Progress' 7 70
Frequent use of this third form is not recommended as it may cause the programmer to overheat.
pv
takes many options, which are divided into display
switches, output modifiers, and general options.
If no display switches are specified, pv
behaves as if
-p
, -t
, -e
, -r
, and -b
had been given
(i.e. everything is switched on). Otherwise, only those display types that
are explicitly switched on will be shown.
-p
--progress
-s
modifier), the progress bar cannot indicate
how close to completion the transfer is, so it will just move left and right
to indicate that data is moving.
-t
--timer
pv
has been running for.
-e
--eta
-r
--rate
-b
--bytes
-n
--numeric
pv
will give an integer percentage, one per line, on standard
error, suitable for piping (via convoluted redirection) into the
dialog
program. Note that -f
is not required if -n
is
being used.
-q
--quiet
-L
option is being used on its own to just
limit the transfer rate of a pipe.
-L RATE
--rate-limit RATE
-W
--wait
gpg
or mcrypt
which require a passphrase before data can be
processed.
-s SIZE
--size SIZE
-i SEC
--interval SEC
-w WIDTH
--width WIDTH
-N NAME
--name NAME
-c
if you have a complicated pipeline and you want to be able to tell
different parts of it apart.
-f
--force
pv
will not output any visual display
if standard error is not a terminal. This option forces it to do so.
-c
--cursor
-N
(name) if you are
using multiple pv
invocations in a single, long, pipeline.
However, it is likely to result in a garbled display if used near the bottom
of the screen and should be considered slightly experimental.
-h
--help
-l
--license
-V
--version
Jump to: b - c - d - e - f - i - l - n - o - p - q - r - s - t - u - w
This document was generated on 7 November 2002 using texi2html 1.55k. It was then munged by a Perl script to stop it looking horrible in Lynx.